package translateDemo;

import java.awt.Rectangle;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class translateDemo {

	public static void main(String[] args) 
	{
		//Create new JFrame
		JFrame frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
		
		//Create frame and set to size of rectangle1
		Rectangle rect1 = new Rectangle(0, 0, 100, 100);
		frame.setSize((int) rect1.getHeight(), (int) rect1.getWidth());
		
		//Show message to prompt for continue
		JOptionPane.showMessageDialog(frame, "Click OK to continue");

		//Set position of JFrame to transformation of rectangle1
		rect1.translate(500, 500);
		frame.setLocation(rect1.getLocation());
		
		
	}

}